/**
 * Created by jackliu on 15/12/16.
 */

var common = require('../../common');
var pool = require('../index');
var mysql = require('mysql');
var ItbBaseModel = require('./ItbBaseModel');


// Schema 结构
var ItbPlatformUserModel = function(obj){
    ItbBaseModel.call(this,obj);

  // 以下为表定义数据，需要的字段就填入
  //`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  //`user_id` bigint(20) NOT NULL COMMENT '用户id',
  //`platform` int(3) NOT NULL DEFAULT '0' COMMENT '平台：0未知，1微信，2小米',
  //`nickname` varchar(50) DEFAULT '' COMMENT '平台昵称',
  //`head_url` text COMMENT '平台头像',
  //`field1` text COMMENT '微信unionId，小米userid',
  //`field2` text COMMENT 'openid',
  //`field3` text,
  //`field4` text,
  //`field5` text,
  //`create_time` datetime DEFAULT NULL,
  //`update_time` datetime DEFAULT NULL,
  //`update_by` varchar(50) DEFAULT NULL,
  //`del_flg` int(1) NOT NULL DEFAULT '0' COMMENT '删除flg',

};
ItbPlatformUserModel.prototype = new ItbBaseModel();

// 取得表名
ItbPlatformUserModel.prototype.getTableName = function(){
    return 'itb_platform_user';
}
// 取得查询语句中where 后面匹配主键的条件（需要各派生类进行重载）
ItbPlatformUserModel.prototype.getWhereConditionOfKeyEqual = function(){
    return 'id='+this.id;
}


// 导出
module.exports = ItbPlatformUserModel;